import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default({
  namespaced:true,
  state:{
    themeColor:window.localStorage.getItem('themeColor') == null ?'theme1':window.localStorage.getItem('themeColor'),
  },
  mutations:{
    //更新主题颜色
    setThemeColor(state,curcolor){
      state.themeColor = curcolor;
      window.localStorage.setItem('themeColor', curcolor)
    }
  }
})
